From: Rosen Penev Date: Mon, 20 Oct 2025 22:42:19 +0000 (-0700) Subject: kea: update to 3.0.1 X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=728e9e1073bf54b5e5c987b18d2bdd59be1a4253;p=feed%2Fpackages.git kea: update to 3.0.1 Requires conversion to meson. Unfortunately, upstream needlessly relies on cc.run() to figure out various things instead of cc.compile(). Requires massive patch. Signed-off-by: Rosen Penev --- diff --git a/net/kea/Makefile b/net/kea/Makefile index a08220b385..521bc55630 100644 --- a/net/kea/Makefile +++ b/net/kea/Makefile @@ -9,23 +9,21 @@ include $(TOPDIR)/rules.mk PKG_NAME:=kea -PKG_VERSION:=2.6.4 -PKG_RELEASE:=3 +PKG_VERSION:=3.0.1 +PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://ftp.isc.org/isc/kea/$(PKG_VERSION) -PKG_HASH:=6806405e4d559abc10febd2c273dc6e2bc6ac42767afa5ca20b118ffba84a671 +PKG_HASH:=ec84fec4bb7f6b9d15a82e755a571e9348eb4d6fbc62bb3f6f1296cd7a24c566 PKG_MAINTAINER:=BangLang Huang , Rosy Song PKG_LICENSE:=MPL-2.0 PKG_LICENSE_FILES:=COPYING -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 -PKG_BUILD_PARALLEL:=1 PKG_BUILD_FLAGS:=gc-sections include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/meson.mk define Package/kea/Default SECTION:=net @@ -190,24 +188,11 @@ endef ###### ************************************************************************* -CONFIGURE_ARGS += \ - --enable-boost-headers-only \ - --with-boost-include="$(STAGING_DIR)/usr" \ - --with-log4cplus="$(STAGING_DIR)/usr" \ - --with-openssl="$(STAGING_DIR)/usr" \ - --without-pic \ - $(if $(CONFIG_PACKAGE_kea-perfdhcp),--enable-perfdhcp,) \ - $(if $(CONFIG_PACKAGE_kea-shell),--enable-shell,) - -CONFIGURE_VARS += \ - cross_compiling="yes" - -TARGET_CXXFLAGS += \ - $(FPIC) \ - -std=c++17 - -TARGET_LDFLAGS += \ - -Wl,--as-needed +MESON_ARGS += \ + -Dkrb5=disabled \ + -Dmysql=disabled \ + -Dnetconf=disabled \ + -Dpostgresql=disabled define Package/kea-libs/install $(INSTALL_DIR) $(1)/usr/lib diff --git a/net/kea/patches/003-no-test-compile.patch b/net/kea/patches/003-no-test-compile.patch deleted file mode 100644 index d704868dad..0000000000 --- a/net/kea/patches/003-no-test-compile.patch +++ /dev/null @@ -1,366 +0,0 @@ ---- a/src/bin/admin/Makefile.am -+++ b/src/bin/admin/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = . tests -+SUBDIRS = . - - # Install kea-admin in sbin. - sbin_SCRIPTS = kea-admin ---- a/src/bin/agent/Makefile.am -+++ b/src/bin/agent/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = . tests -+SUBDIRS = . - - AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib - AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin ---- a/src/bin/d2/Makefile.am -+++ b/src/bin/d2/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = . tests -+SUBDIRS = . - - AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib - AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin ---- a/src/bin/dhcp4/Makefile.am -+++ b/src/bin/dhcp4/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = . tests -+SUBDIRS = . - - AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib - AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin ---- a/src/bin/dhcp6/Makefile.am -+++ b/src/bin/dhcp6/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = . tests -+SUBDIRS = . - - AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib - AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin ---- a/src/bin/keactrl/Makefile.am -+++ b/src/bin/keactrl/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = . tests -+SUBDIRS = . - - # Install keactrl in sbin and the keactrl.conf required by the keactrl - # in etc. keactrl will look for its configuration file in the etc folder. ---- a/src/bin/lfc/Makefile.am -+++ b/src/bin/lfc/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = . tests -+SUBDIRS = . - - AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib - AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin ---- a/src/bin/netconf/Makefile.am -+++ b/src/bin/netconf/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = . tests -+SUBDIRS = . - - AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib - AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin ---- a/src/bin/perfdhcp/Makefile.am -+++ b/src/bin/perfdhcp/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = . tests -+SUBDIRS = . - - AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib - AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin ---- a/src/bin/shell/Makefile.am -+++ b/src/bin/shell/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = . tests -+SUBDIRS = . - - pkgpython_PYTHON = kea_conn.py kea_connector3.py - ---- a/src/hooks/dhcp/high_availability/Makefile.am -+++ b/src/hooks/dhcp/high_availability/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = . libloadtests tests -+SUBDIRS = . libloadtests - - AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib - AM_CPPFLAGS += $(BOOST_INCLUDES) $(CRYPTO_CFLAGS) $(CRYPTO_INCLUDES) ---- a/src/hooks/dhcp/lease_cmds/Makefile.am -+++ b/src/hooks/dhcp/lease_cmds/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = . tests libloadtests -+SUBDIRS = . libloadtests - - AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib - AM_CPPFLAGS += $(BOOST_INCLUDES) ---- a/src/hooks/dhcp/stat_cmds/Makefile.am -+++ b/src/hooks/dhcp/stat_cmds/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = . tests libloadtests -+SUBDIRS = . libloadtests - - AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib - AM_CPPFLAGS += $(BOOST_INCLUDES) ---- a/src/hooks/dhcp/user_chk/Makefile.am -+++ b/src/hooks/dhcp/user_chk/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = . tests -+SUBDIRS = . - - AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib - AM_CPPFLAGS += $(BOOST_INCLUDES) ---- a/src/lib/asiodns/Makefile.am -+++ b/src/lib/asiodns/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = . tests -+SUBDIRS = . - - AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib - AM_CPPFLAGS += $(BOOST_INCLUDES) ---- a/src/lib/asiolink/Makefile.am -+++ b/src/lib/asiolink/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = . testutils tests -+SUBDIRS = . - - AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib - AM_CPPFLAGS += $(BOOST_INCLUDES) $(CRYPTO_CFLAGS) $(CRYPTO_INCLUDES) ---- a/src/lib/cc/Makefile.am -+++ b/src/lib/cc/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = . tests -+SUBDIRS = . - - AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib - AM_CPPFLAGS += $(BOOST_INCLUDES) ---- a/src/lib/config/Makefile.am -+++ b/src/lib/config/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = . tests -+SUBDIRS = . - - AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib - AM_CPPFLAGS += $(BOOST_INCLUDES) $(CRYPTO_CFLAGS) $(CRYPTO_INCLUDES) ---- a/src/lib/config_backend/Makefile.am -+++ b/src/lib/config_backend/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = . tests -+SUBDIRS = . - - AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib - AM_CPPFLAGS += $(BOOST_INCLUDES) ---- a/src/lib/cryptolink/Makefile.am -+++ b/src/lib/cryptolink/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = . tests -+SUBDIRS = . - - AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib - AM_CPPFLAGS += $(BOOST_INCLUDES) $(CRYPTO_CFLAGS) $(CRYPTO_INCLUDES) ---- a/src/lib/database/Makefile.am -+++ b/src/lib/database/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = . testutils tests -+SUBDIRS = . - - AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib - AM_CPPFLAGS += $(BOOST_INCLUDES) ---- a/src/lib/dhcp/Makefile.am -+++ b/src/lib/dhcp/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = . testutils tests -+SUBDIRS = . - - AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib - AM_CPPFLAGS += $(BOOST_INCLUDES) ---- a/src/lib/dhcp_ddns/Makefile.am -+++ b/src/lib/dhcp_ddns/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = . tests -+SUBDIRS = . - - AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib - AM_CPPFLAGS += $(BOOST_INCLUDES) ---- a/src/lib/dhcpsrv/Makefile.am -+++ b/src/lib/dhcpsrv/Makefile.am -@@ -1,6 +1,6 @@ - AUTOMAKE_OPTIONS = subdir-objects - --SUBDIRS = . testutils tests -+SUBDIRS = . - - # DATA_DIR is the directory where to put default CSV files and the DHCPv6 - # server ID file (i.e. the file where the server finds its DUID at startup). ---- a/src/lib/dns/Makefile.am -+++ b/src/lib/dns/Makefile.am -@@ -1,6 +1,6 @@ - AUTOMAKE_OPTIONS = subdir-objects - --SUBDIRS = . tests -+SUBDIRS = . - - AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib - AM_CPPFLAGS += $(BOOST_INCLUDES) ---- a/src/lib/eval/Makefile.am -+++ b/src/lib/eval/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = . tests -+SUBDIRS = . - - AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib - AM_CPPFLAGS += $(BOOST_INCLUDES) ---- a/src/lib/exceptions/Makefile.am -+++ b/src/lib/exceptions/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = . tests -+SUBDIRS = . - - AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib - AM_CXXFLAGS=$(KEA_CXXFLAGS) ---- a/src/lib/hooks/Makefile.am -+++ b/src/lib/hooks/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = . tests -+SUBDIRS = . - - AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib - AM_CPPFLAGS += -DDEFAULT_HOOKS_PATH=\"$(libdir)/kea/hooks\" ---- a/src/lib/http/Makefile.am -+++ b/src/lib/http/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = . tests -+SUBDIRS = . - - AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib - AM_CPPFLAGS += $(BOOST_INCLUDES) $(CRYPTO_CFLAGS) $(CRYPTO_INCLUDES) ---- a/src/lib/log/Makefile.am -+++ b/src/lib/log/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = interprocess . compiler tests -+SUBDIRS = interprocess . compiler - - AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib - AM_CPPFLAGS += $(BOOST_INCLUDES) ---- a/src/lib/log/interprocess/Makefile.am -+++ b/src/lib/log/interprocess/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = . tests -+SUBDIRS = . - - AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib - AM_CPPFLAGS += -DLOCKFILE_DIR=\"$(localstatedir)/run/$(PACKAGE_NAME)\" ---- a/src/lib/mysql/Makefile.am -+++ b/src/lib/mysql/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = . testutils tests -+SUBDIRS = . - - AM_CPPFLAGS = - AM_CPPFLAGS += -DKEA_ADMIN=\"@prefix@/sbin/kea-admin\" ---- a/src/lib/pgsql/Makefile.am -+++ b/src/lib/pgsql/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = . testutils tests -+SUBDIRS = . - - AM_CPPFLAGS = - AM_CPPFLAGS += -DKEA_ADMIN=\"@prefix@/sbin/kea-admin\" ---- a/src/lib/process/Makefile.am -+++ b/src/lib/process/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = cfgrpt . testutils tests -+SUBDIRS = cfgrpt . testutils - # DATA_DIR is the directory where to put PID files. - dhcp_data_dir = @runstatedir@/@PACKAGE@ - AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib ---- a/src/lib/stats/Makefile.am -+++ b/src/lib/stats/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = . tests testutils -+SUBDIRS = . - - AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib - AM_CPPFLAGS += $(BOOST_INCLUDES) ---- a/src/lib/util/Makefile.am -+++ b/src/lib/util/Makefile.am -@@ -1,6 +1,6 @@ - AUTOMAKE_OPTIONS = subdir-objects - --SUBDIRS = . io unittests tests python -+SUBDIRS = . io unittests python - - AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib - AM_CPPFLAGS += $(BOOST_INCLUDES) ---- a/src/lib/yang/Makefile.am -+++ b/src/lib/yang/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = . testutils pretests tests -+SUBDIRS = . - - AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib - AM_CPPFLAGS += $(BOOST_INCLUDES) ---- a/src/hooks/dhcp/bootp/Makefile.am -+++ b/src/hooks/dhcp/bootp/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = . tests libloadtests -+SUBDIRS = . libloadtests - - AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib - AM_CPPFLAGS += $(BOOST_INCLUDES) ---- a/src/hooks/dhcp/flex_option/Makefile.am -+++ b/src/hooks/dhcp/flex_option/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = . libloadtests tests -+SUBDIRS = . libloadtests - - AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib - AM_CPPFLAGS += $(BOOST_INCLUDES) ---- a/src/hooks/dhcp/mysql_cb/Makefile.am -+++ b/src/hooks/dhcp/mysql_cb/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = . tests libloadtests -+SUBDIRS = . libloadtests - - AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib - AM_CPPFLAGS += $(BOOST_INCLUDES) $(MYSQL_CPPFLAGS) ---- a/src/hooks/dhcp/pgsql_cb/Makefile.am -+++ b/src/hooks/dhcp/pgsql_cb/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = . tests libloadtests -+SUBDIRS = . libloadtests - - AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib - AM_CPPFLAGS += $(BOOST_INCLUDES) $(PGSQL_CPPFLAGS) ---- a/src/hooks/dhcp/run_script/Makefile.am -+++ b/src/hooks/dhcp/run_script/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = . libloadtests tests -+SUBDIRS = . libloadtests - - AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib - AM_CPPFLAGS += $(BOOST_INCLUDES) ---- a/src/lib/d2srv/Makefile.am -+++ b/src/lib/d2srv/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = . testutils tests -+SUBDIRS = . testutils - - AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib - AM_CPPFLAGS += $(BOOST_INCLUDES) ---- a/src/lib/process/cfgrpt/Makefile.am -+++ b/src/lib/process/cfgrpt/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = . tests -+SUBDIRS = . - - AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib - AM_CXXFLAGS = $(KEA_CXXFLAGS) ---- a/src/lib/tcp/Makefile.am -+++ b/src/lib/tcp/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = . tests -+SUBDIRS = . - - AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib - AM_CPPFLAGS += $(BOOST_INCLUDES) $(CRYPTO_CFLAGS) $(CRYPTO_INCLUDES) diff --git a/net/kea/patches/004-use-shell-expansion-instead.patch b/net/kea/patches/004-use-shell-expansion-instead.patch deleted file mode 100644 index 32b3a7e327..0000000000 --- a/net/kea/patches/004-use-shell-expansion-instead.patch +++ /dev/null @@ -1,18 +0,0 @@ -commit 79f969979f2ac7ed73dbc2682a53c95ff84adb1a -Author: Philip Prindeville -Date: Sat Aug 3 10:19:05 2024 -0600 - - [3533] do filename munging with variable expansions - ---- a/src/bin/keactrl/keactrl.in -+++ b/src/bin/keactrl/keactrl.in -@@ -116,7 +116,8 @@ get_pid_from_file() { - - # Extract the name portion (from last slash to last dot) of the config file name. - local conf_name -- conf_name=$(basename -- "${kea_config_file}" | rev | cut -f2- -d'.' | rev) -+ conf_name=${kea_config_file##*/} -+ conf_name=${conf_name%.*} - - # Default the directory to --localstatedir / run - local pid_file_dir diff --git a/net/kea/patches/020-boost-system.patch b/net/kea/patches/020-boost-system.patch new file mode 100644 index 0000000000..16273a4b62 --- /dev/null +++ b/net/kea/patches/020-boost-system.patch @@ -0,0 +1,11 @@ +--- a/meson.build ++++ b/meson.build +@@ -189,7 +189,7 @@ message(f'Detected system "@SYSTEM@".') + + #### Dependencies + +-boost_dep = dependency('boost', version: '>=1.66', modules: ['system']) ++boost_dep = dependency('boost', version: '>=1.66') + dl_dep = dependency('dl') + threads_dep = dependency('threads') + add_project_dependencies(boost_dep, dl_dep, threads_dep, language: ['cpp']) diff --git a/net/kea/patches/030-cpp.patch b/net/kea/patches/030-cpp.patch new file mode 100644 index 0000000000..c6ffafa5b8 --- /dev/null +++ b/net/kea/patches/030-cpp.patch @@ -0,0 +1,320 @@ +--- a/meson.build ++++ b/meson.build +@@ -300,7 +300,6 @@ endif + # Google Test + GTEST_DEP = dependency( + 'gtest', +- fallback: ['gtest', 'gtest_dep'], + required: FUZZ_OPT.enabled() or TESTS_OPT.enabled(), + ) + +@@ -363,167 +362,80 @@ conf_data.set('HAVE_PGSQL', POSTGRESQL_D + + #### Compiler Checks + +-# The required keyword in cpp.run() is an 1.5.0 feature. +-result = cpp.run( +- fs.read('compiler-checks/get-cpp-standard.cc'), +- name: 'Get cpp standard', +-) +-if result.returncode() == 0 +- cpp_standard = result.stdout().strip() +-else +- error('C++ standard is unknown') +-endif +-message(f'Detected C++ standard (__cplusplus value) is @cpp_standard@.') +-cpp_std_opt = get_option('cpp_std') +-no_cpp_std_opt_msg = 'Please set a C++ standard by passing the -D cpp_std argument to meson.' +-cpp_std_opt_msg = f'-D cpp_std=@cpp_std_opt@ is not enough.' +-if cpp_standard.version_compare('<201100') +- msgs = [ +- 'Kea requires at least C++11 to build.', +- 'Recommended C++ standard is C++14 but some dependencies require at least C++20', +- ] +- if cpp_std_opt == 'none' +- msgs += no_cpp_std_opt_msg +- else +- msgs += cpp_std_opt_msg +- endif +- error('\n'.join(msgs)) +-endif +-if cpp_standard.version_compare('<201400') +- result = cpp.run( +- fs.read('compiler-checks/boost-math-cpp14.cc'), +- name: 'BOOST_MATH_REQUIRES_CPP14', +- dependencies: [boost_dep, threads_dep], +- ) +- if result.returncode() != 0 +- msgs = ['Boost Math requires at least C++14.'] +- if cpp_std_opt == 'none' +- msgs += no_cpp_std_opt_msg +- else +- msgs += cpp_std_opt_msg +- endif +- error('\n'.join(msgs)) +- endif +-endif +-if NETCONF_DEP.found() and cpp_standard.version_compare('<202000') +- msgs = ['NETCONF dependency requires at least C++20.'] +- if cpp_std_opt == 'none' +- msgs += no_cpp_std_opt_msg +- else +- msgs += cpp_std_opt_msg +- endif +- if netconf_opt.enabled() +- error('\n'.join(msgs)) +- else +- msgs += 'Disabling NETCONF.' +- warning('\n'.join(msgs)) +- NETCONF_DEP = disabler() +- endif +-endif +-if CRYPTO_DEP.name() == botan.name() and cpp_standard.version_compare('<202000') +- msgs = ['Botan dependency requires at least C++20.'] +- if cpp_std_opt == 'none' +- msgs += no_cpp_std_opt_msg +- else +- msgs += cpp_std_opt_msg +- endif +- error('\n'.join(msgs)) +-endif +- +-result = cpp.run( +- fs.read('compiler-checks/boost-has-threads.cc'), +- dependencies: [boost_dep, threads_dep], +- name: 'BOOST_HAS_THREADS', +-) +-if result.returncode() != 0 +- error('boost is not configured to use threads') +-endif +- +-if cpp.has_header('boost/regex.h', dependencies: [boost_dep], required: false) +- result = cpp.run( +- fs.read('compiler-checks/boost-regex.cc'), +- dependencies: [boost_dep, threads_dep], +- name: 'GET_SYSTEM_VS_BOOST_REGEX_HEADER', +- ) +- if result.returncode() != 0 +- error('boost/regex.h is used in place of system regex.h') +- endif +-endif +- +-result = cpp.run( ++result = cpp.compiles( + fs.read('compiler-checks/chrono-same-duration.cc'), + name: 'CHRONO_SAME_DURATION', + ) +-conf_data.set('CHRONO_SAME_DURATION', result.returncode() == 0) ++conf_data.set('CHRONO_SAME_DURATION', result) + + if CRYPTO_DEP.name() == openssl.name() +- result1 = cpp.run( ++ result1 = cpp.compiles( + fs.read('compiler-checks/have-generic-tls-method.cc'), + name: 'HAVE_GENERIC_TLS_METHOD', + dependencies: [boost_dep, CRYPTO_DEP, threads_dep], + ) +- result2 = cpp.run( ++ result2 = cpp.compiles( + fs.read('compiler-checks/stream-truncated-error.cc'), + name: 'HAVE_STREAM_TRUNCATED_ERROR', + dependencies: [boost_dep, CRYPTO_DEP, threads_dep], + ) +- if result1.returncode() != 0 or result2.returncode() != 0 ++ if not result1 or not result2 + error('Boost TLS support broken.') + endif + endif + + if CRYPTO_DEP.name() == botan.name() +- result = cpp.run( ++ result = cpp.compiles( + fs.read('compiler-checks/botan-hash.cc'), + name: 'CHECK_BOTAN_LIBRARY', + dependencies: [boost_dep, CRYPTO_DEP, threads_dep], + ) +- if result.returncode() != 0 ++ if not result + error('Botan library does not work.') + endif + endif + +-result = cpp.run( ++result = cpp.compiles( + fs.read('compiler-checks/have-optreset.cc'), + name: 'HAVE_OPTRESET', + ) +-conf_data.set('HAVE_OPTRESET', result.returncode() == 0) ++conf_data.set('HAVE_OPTRESET', result) + +-result = cpp.run(fs.read('compiler-checks/have-sa-len.cc'), name: 'HAVE_SA_LEN') +-conf_data.set('HAVE_SA_LEN', result.returncode() == 0) ++result = cpp.compiles(fs.read('compiler-checks/have-sa-len.cc'), name: 'HAVE_SA_LEN') ++conf_data.set('HAVE_SA_LEN', result) + +-result = cpp.run( ++result = cpp.compiles( + fs.read('compiler-checks/log4cplus-initializer.cc'), + name: 'LOG4CPLUS_INITIALIZER_H', + dependencies: [LOG4CPLUS_DEP], + ) +-conf_data.set('LOG4CPLUS_INITIALIZER_H', result.returncode() == 0) ++conf_data.set('LOG4CPLUS_INITIALIZER_H', result) + + if MYSQL_DEP.found() +- result = cpp.run( ++ result = cpp.compiles( + fs.read('compiler-checks/mysql-my-bool.cc'), + name: 'MYSQL_MY_BOOL', + dependencies: [MYSQL_DEP], + ) +- conf_data.set('HAVE_MYSQL_MY_BOOL', result.returncode() == 0) ++ conf_data.set('HAVE_MYSQL_MY_BOOL', result) + +- result = cpp.run( ++ result = cpp.compiles( + fs.read('compiler-checks/mysql-get-option.cc'), + name: 'HAVE_MYSQL_GET_OPTION', + dependencies: [MYSQL_DEP], + ) +- conf_data.set('HAVE_MYSQL_GET_OPTION', result.returncode() == 0) ++ conf_data.set('HAVE_MYSQL_GET_OPTION', result) + endif + +-result = cpp.run( ++result = cpp.compiles( + fs.read('compiler-checks/fuzzing-with-clusterfuzzlite.cc'), + name: 'FUZZING_WITH_CLUSTERFUZZLITE', + ) +-FUZZING_WITH_CLUSTERFUZZLITE = result.returncode() == 0 ++FUZZING_WITH_CLUSTERFUZZLITE = result + + have_afl = false +-result = cpp.run(fs.read('compiler-checks/have-afl.cc'), name: 'HAVE_AFL') +-if result.returncode() == 0 ++result = cpp.compiles(fs.read('compiler-checks/have-afl.cc'), name: 'HAVE_AFL') ++if result + have_afl = true + endif + conf_data.set('HAVE_AFL', have_afl) +@@ -534,22 +446,22 @@ if GTEST_DEP.found() + if GTEST_DEP.type_name() == 'internal' + conf_data.set('HAVE_CREATE_UNIFIED_DIFF', true) + else +- result = cpp.run( ++ result = cpp.compiles( + fs.read('compiler-checks/have-create-unified-diff.cc'), + name: 'HAVE_CREATE_UNIFIED_DIFF', + dependencies: [GTEST_DEP], + ) +- conf_data.set('HAVE_CREATE_UNIFIED_DIFF', result.returncode() == 0) ++ conf_data.set('HAVE_CREATE_UNIFIED_DIFF', result) + endif + endif + + if KRB5_DEP.found() +- result = cpp.run( ++ result = cpp.compiles( + fs.read('compiler-checks/have-gss-str-to-oid.cc'), + name: 'HAVE_GSS_STR_TO_OID', + dependencies: [KRB5_DEP], + ) +- conf_data.set('HAVE_GSS_STR_TO_OID', result.returncode() == 0) ++ conf_data.set('HAVE_GSS_STR_TO_OID', result) + endif + + #### Other checks. +@@ -753,7 +665,7 @@ if result.returncode() == 0 + else + report_conf_data.set('CXX_VERSION', 'unknown') + endif +-report_conf_data.set('CXX_STANDARD', cpp_standard) ++report_conf_data.set('CXX_STANDARD', '20') + compile_args += cpp_args_opt + report_conf_data.set('CXX_ARGS', ' '.join(compile_args)) + report_conf_data.set('LD_ID', cpp.get_linker_id()) +@@ -762,29 +674,25 @@ report_conf_data.set('LD_ARGS', ' '.join + report_conf_data.set('PYTHON_PATH', PYTHON.full_path()) + report_conf_data.set('PYTHON_VERSION', PYTHON.version()) + report_conf_data.set('PKGPYTHONDIR', PKGPYTHONDIR) +-result = cpp.run( ++result = cpp.compiles( + fs.read('compiler-checks/get-boost-version.cc'), + dependencies: [boost_dep, threads_dep], + name: 'Get Boost version', + ) +-if result.returncode() == 0 +- report_conf_data.set('BOOST_VERSION', result.stdout().strip()) ++if result ++ report_conf_data.set('BOOST_VERSION', boost_dep.version()) + else + report_conf_data.set('BOOST_VERSION', 'unknown version') + endif + if CRYPTO_DEP.name() == botan.name() + report_conf_data.set('CRYPTO_NAME', 'Botan') + report_conf_data.set('SPACES', ' ') +- result = cpp.run( ++ result = cpp.compiles( + fs.read('compiler-checks/get-botan-version.cc'), + name: 'Get Botan version', + dependencies: [CRYPTO_DEP], + ) +- if result.returncode() == 0 +- version = result.stdout().strip() +- else +- version = botan.version() +- endif ++ version = botan.version() + if version == 'unknown' + version = 'unknown version' + endif +@@ -792,31 +700,23 @@ if CRYPTO_DEP.name() == botan.name() + elif CRYPTO_DEP.name() == openssl.name() + report_conf_data.set('CRYPTO_NAME', 'OpenSSL') + report_conf_data.set('SPACES', ' ') +- result = cpp.run( ++ result = cpp.compiles( + fs.read('compiler-checks/get-openssl-version.cc'), + name: 'Get OpenSSL version', + dependencies: [CRYPTO_DEP], + ) +- if result.returncode() == 0 +- version = result.stdout().strip() +- else +- version = openssl.version() +- endif ++ version = openssl.version() + if version == 'unknown' + version = 'unknown version' + endif + report_conf_data.set('CRYPTO_VERSION', version) + endif +-result = cpp.run( ++result = cpp.compiles( + fs.read('compiler-checks/get-log4cplus-version.cc'), + name: 'Get Log4cplus version', + dependencies: [LOG4CPLUS_DEP], + ) +-if result.returncode() == 0 +- version = result.stdout().strip() +-else +- version = log4cplus.version() +-endif ++version = LOG4CPLUS_DEP.version() + if version == 'unknown' + version = 'unknown version' + endif +@@ -1091,13 +991,6 @@ pkg.generate( + + #### More Custom Targets + +-if TARGETS_GEN_MESSAGES.length() > 0 +- alias_target('messages', TARGETS_GEN_MESSAGES) +-else +- error( +- 'No messages to generate. This is probably an error in the meson.build files.', +- ) +-endif + if TARGETS_GEN_PARSER.length() > 0 + alias_target('parser', TARGETS_GEN_PARSER) + else